package com.wysql.ascost.model.info;

import cn.hutool.core.date.DateUtil;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
public class InfoContractstoreDtl implements Serializable {
    private static final long serialVersionUID = 1L;


    @ApiModelProperty(value = "主键ID")
    private String id;

    @ApiModelProperty(value = "主表id")
    private String mainid;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "导入时间")
    private Date creattime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(value = "最后修改时间")
    private Date updatetime;

    @ApiModelProperty(value = "备注")
    private String memo;

    @ApiModelProperty(value = "物料号")
    private String matnum;

    @ApiModelProperty(value = "物料描述")
    private String matname;

    @ApiModelProperty(value = "物料计量单位")
    private String matunit;

    @ApiModelProperty(value = "技术规范id")
    private String techid;

    @ApiModelProperty(value = "拓展描述")
    private String dtlmemo;

    @ApiModelProperty(value = "含税单价")
    private BigDecimal price;

    @ApiModelProperty(value = "分标信息")
    private String partmemo;

    @ApiModelProperty(value = "物料大类")
    private String mattype1;

    @ApiModelProperty(value = "物料中类")
    private String mattype2;

    @ApiModelProperty(value = "物料小类")
    private String mattype3;

    @ApiModelProperty(value = "国网招标计划编号")
    private String targetnum;

    @ApiModelProperty(value = "批次阈值")
    private String batchvalue;

    @ApiModelProperty(value = "协议执行比值")
    private String exevalue;

    @ApiModelProperty(value = "协议编号（ERP）")
    private String erpnum;

    @ApiModelProperty(value = "删除标识（0未删除1已删除）")
    private Integer isdelete;


    public InfoContractstoreDtl(String id,String mainid,Date creattime,Date updatetime,String memo,String matnum,String matname,String matunit,String techid,String dtlmemo,BigDecimal price,String partmemo,String mattype1,String mattype2,String mattype3,String targetnum,String batchvalue,String exevalue,String erpnum,Integer isdelete){

        this.id = id;

        this.mainid = mainid;

        this.creattime = creattime;

        this.updatetime = updatetime;

        this.memo = memo;

        this.matnum = matnum;

        this.matname = matname;

        this.matunit = matunit;

        this.techid = techid;

        this.dtlmemo = dtlmemo;

        this.price = price;

        this.partmemo = partmemo;

        this.mattype1 = mattype1;

        this.mattype2 = mattype2;

        this.mattype3 = mattype3;

        this.targetnum = targetnum;

        this.batchvalue = batchvalue;

        this.exevalue = exevalue;

        this.erpnum = erpnum;

        this.isdelete = isdelete;

    }

    public InfoContractstoreDtl() {
        super();
    }

    public String dateToStringConvert(Date date) {
        if (date != null) {
            return DateUtil.format(date, "yyyy-MM-dd HH:mm:ss");
        }
        return "";
    }


}